package com.dgut.smart_house.service.impl;

import com.dgut.smart_house.domain.Node;
import com.dgut.smart_house.domain.Types;
import com.dgut.smart_house.domain.User;
import com.dgut.smart_house.mapper.AdminMapper;
import com.dgut.smart_house.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    public int addNewNode(Node node) {
        return adminMapper.addNewNode(node);
    }

    ;

    public int addNewType(Types types) {
        return adminMapper.addNewType(types);
    }

    ;


    public List<User> selectAllUsers() {
        return adminMapper.selectAllUsers();
    }

    ;


    public int deleteOneUser(int Id) {
        return adminMapper.deleteOneUser(Id);
    }

    ;
}
